<html>
<head>
<title>Docs For Class Pike_Grid_Datasource_Doctrine</title>
<link rel="stylesheet" type="text/css" href="../../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">Pike_Grid</td>
  </tr>
  <tr><td class="header_line"><img src="../../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                                                                                                    
                                                                                          		  [ <a href="../../classtrees_Pike_Grid.html" class="menu">class tree: Pike_Grid</a> ]
		  [ <a href="../../elementindex_Pike_Grid.html" class="menu">index: Pike_Grid</a> ]
		  	    [ <a href="../../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../../li_Pike.html">Pike</a><br />
              <a href="../../li_DoctrineExtensions-Paginate.html">DoctrineExtensions-Paginate</a><br />
              <a href="../../li_Pike_Application.html">Pike_Application</a><br />
              <a href="../../li_Pike_Doctrine.html">Pike_Doctrine</a><br />
              <a href="../../li_Pike_Grid.html">Pike_Grid</a><br />
              <a href="../../li_Pike_Reflection.html">Pike_Reflection</a><br />
              <a href="../../li_Pike_Session.html">Pike_Session</a><br />
              <a href="../../li_Pike_View.html">Pike_View</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../../Pike_Grid/_Grid.php.html">		Grid.php
		</a><br>
	  </div><br />
	subpackage <b>Datasource</b><br>  <div class="package">
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Abstract.php.html">		Abstract.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Columns.php.html">		Columns.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Doctrine---CountWalker.php.html">		CountWalker.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Doctrine.php.html">		Doctrine.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Interface.php.html">		Interface.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Doctrine---OrderByWalker.php.html">		OrderByWalker.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Doctrine---Paginate.php.html">		Paginate.php
		</a><br>
			<a href="../../Pike_Grid/Datasource/_Grid---Datasource---Doctrine---WhereLikeWalker.php.html">		WhereLikeWalker.php
		</a><br>
	  </div><br />
      
            <b>Interfaces:</b><br />
        <div class="package">
	Datasource<br />	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html">Pike_Grid_Datasource_Interface</a><br />
	  </div>
      
            <b>Classes:</b><br />
        <div class="package">
	Datasource<br />	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html">Pike_Grid_Datasource_Abstract</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Columns.html">Pike_Grid_Datasource_Columns</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html">Pike_Grid_Datasource_Doctrine</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine_CountWalker.html">Pike_Grid_Datasource_Doctrine_CountWalker</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine_OrderByWalker.html">Pike_Grid_Datasource_Doctrine_OrderByWalker</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine_Paginate.html">Pike_Grid_Datasource_Doctrine_Paginate</a><br />
	    &nbsp;&nbsp;		<a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine_WhereLikeWalker.html">Pike_Grid_Datasource_Doctrine_WhereLikeWalker</a><br />
	  </div>
  <div class="package">
		    		<a href="../../Pike_Grid/Pike_Grid.html">Pike_Grid</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Pike_Grid_Datasource_Doctrine</h1>
Source Location: /Grid/Datasource/Doctrine.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html">Pike_Grid_Datasource_Abstract</a>
   |
   --Pike_Grid_Datasource_Doctrine</pre><br />
<div class="description">Datasource for Doctrine queries and entities. You can use this datasource with  Pike_Grid which will both create all neccasary javascript and JSON for drawing  a grid with JQgrid.</div><br /><br />
<h4>Author(s):</h4>
<ul>
              </ul>




      
      

<h4>Copyright:</h4>
<ul>
  <li>Copyright (C) 2011 by Pieter Vogelaar (platinadesigns.nl) and Kees Schepers (keesschepers.nl)</li>
</ul>
                <p class="implements">
            Implements interfaces:
            <ul>
                <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html">Pike_Grid_Datasource_Interface</a></li>            </ul>
        </p>
        
</td>

<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#var$_identifierColumn">$_identifierColumn</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#var$_query">$_query</a></li>
  </ul>
</td>


<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#method__construct">__construct</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#methodgetDefaultSorting">getDefaultSorting</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#methodgetJSON">getJSON</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#methodsetEventFilter">setEventFilter</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#methodsetEventSort">setEventSort</a></li>
    <li><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Doctrine.html#methodsetIdentifierColumn">setIdentifierColumn</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>




<td valign="top">
<h3>Inherited Variables</h3>
<div class="tags">
<h4>Class: <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html">Pike_Grid_Datasource_Abstract</a></h4>
<dl>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$columns">Pike_Grid_Datasource_Abstract::$columns</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$onFilter">Pike_Grid_Datasource_Abstract::$onFilter</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$onOrder">Pike_Grid_Datasource_Abstract::$onOrder</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$_data">Pike_Grid_Datasource_Abstract::$_data</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$_limitPerPage">Pike_Grid_Datasource_Abstract::$_limitPerPage</a>
  </dt>
<dd>
   
</dd>
<dt>
  <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#var$_params">Pike_Grid_Datasource_Abstract::$_params</a>
  </dt>
<dd>
   
</dd>
</dl>
</div>
</td>

<td valign="top">
<h3>Inherited Methods</h3>
<div class="tags">
<h4>Class: <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html">Pike_Grid_Datasource_Abstract</a></h4>
<dl>
    <dt>
    <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#methodsetParameters">Pike_Grid_Datasource_Abstract::setParameters()</a>
  </dt>
  <dd>
    Set the parameters which proberly come from jquery.
  </dd>
    <dt>
    <a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Abstract.html#methodsetResultsPerPage">Pike_Grid_Datasource_Abstract::setResultsPerPage()</a>
  </dt>
  <dd>
    
  </dd>
  </dl>
</div>
</td>

</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a43">43</a>]<br />
Datasource for Doctrine queries and entities. You can use this datasource with  Pike_Grid which will both create all neccasary javascript and JSON for drawing  a grid with JQgrid.<br /><br /><p>Dependecies: jqGrid, Doctrine, Zend Framework</p><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>copyright:</b>&nbsp;&nbsp;</td><td>Copyright (C) 2011 by Pieter Vogelaar (platinadesigns.nl) and Kees Schepers (keesschepers.nl)</td>
  </tr>
  <tr>
    <td><b>license:</b>&nbsp;&nbsp;</td><td>MIT</td>
  </tr>
</table>
</div>
</div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />

<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
	<a name="var$_identifierColumn"></a>
	<p></p>
	<h4>$_identifierColumn = <span class="value"></span></h4>
	<p>[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a56">56</a>]</p>
  When this column is set it tells jqGrid how to identify each row<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>array</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$_query"></a>
	<p></p>
	<h4>$_query = <span class="value"></span></h4>
	<p>[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a49">49</a>]</p>
  <br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>var:</b>&nbsp;&nbsp;</td><td>Doctrine\ORM\Query</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>protected</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>$_query</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />

<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">

  <hr />
	<a name="method__construct"></a>
	<h3>constructor __construct <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a58">58</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>Pike_Grid_Datasource_Doctrine __construct(

$source)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$source</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodgetDefaultSorting"></a>
	<h3>method getDefaultSorting <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a216">216</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array getDefaultSorting(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Look if there is default sorting defined in the original query by asking the AST. Defining  default sorting is done outside the datasource where query or querybuilder object is defined.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

			<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html#methodgetDefaultSorting">Pike_Grid_Datasource_Interface::getDefaultSorting()</a></dt>
						<dd>Returns an array indicating on which field and which order the grid is by default sorted on.</dd>
					</dl>
		
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodgetJSON"></a>
	<h3>method getJSON <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a323">323</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>string getJSON(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Returns a JSON string useable for JQuery Grid. This grids interprets this  data and is able to draw a grid.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>return:</b>&nbsp;&nbsp;</td><td>JSON data</td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

			<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html#methodgetJSON">Pike_Grid_Datasource_Interface::getJSON()</a></dt>
					</dl>
		
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsetEventFilter"></a>
	<h3>method setEventFilter <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a205">205</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array setEventFilter(

$function)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Defines what happends when the user filters data with jqGrid and send to the server. Must  return an array with query hints!<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

			<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html#methodsetEventFilter">Pike_Grid_Datasource_Interface::setEventFilter()</a></dt>
						<dd>Defines what happends when the user filters data with jqGrid and send to the server. Return</dd>
					</dl>
		
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Closure&nbsp;&nbsp;</td>
        <td><b>$function</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsetEventSort"></a>
	<h3>method setEventSort <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a195">195</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>array setEventSort(

$function)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Defines what happends when the grid is sorted by the server. Must return a array  with query hints!<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

			<hr class="separator" />
		<div class="notes">Implementation of:</div>
			<dl>
			<dt><a href="../../Pike_Grid/Datasource/Pike_Grid_Datasource_Interface.html#methodsetEventSort">Pike_Grid_Datasource_Interface::setEventSort()</a></dt>
						<dd>Defines what happends when the grid is sorted by the server. Return value depends on the  type of datasource.</dd>
					</dl>
		
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">Closure&nbsp;&nbsp;</td>
        <td><b>$function</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsetIdentifierColumn"></a>
	<h3>method setIdentifierColumn <span class="smalllinenumber">[line <a href="../../__filesource/fsource_Pike_Grid_Datasource_GridDatasourceDoctrine.php.html#a181">181</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void setIdentifierColumn(
string
$column)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Sets a column name which identifies every row in the grid.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">string&nbsp;&nbsp;</td>
        <td><b>$column</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 15 Sep 2011 16:24:51 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>